#!/usr/bin/python3
# @Time    : 2018/5/26 下午 14:11:23  
# @Author  : LaoJI

from . import web
import json
from flask import jsonify, render_template
from app.service.generator.app import create_ques


@web.route('/hello', methods=['Get'])
def hello():
    test = {"Name": "Runoob",
            'Age': 7,
            'Class': 'First'}
    return render_template('index.html', title=test)
    # return json.dumps(test), 200, {'content-type':'test/html'}


@web.route('/calc', methods=['Get'])
def calc():
    ques = create_ques()
    # return jsonify(ques['data'])
    return ques
